<?php

class Jira_SoapClient extends Jira_SoapClientGenerated {
	protected $_token = null;
	protected $_user = false;
	protected $_pass = false;
	function __construct($jiraserver,$jirauser,$jirapassword){
		parent::__construct('http://'.$jiraserver.'/rpc/soap/jirasoapservice-v2?wsdl');
		$this->_user = $jirauser;
		$this->_pass = $jirapassword;
	}
	function getToken(){
		if(is_null($this->_token)){
			$this->_token = $this->login($this->_user,$this->_pass);
		}
		return $this->_token;
	}
}